package team.xyg.cdtu2.service.impl;

import team.xyg.cdtu2.dto.PlatMapData;
import team.xyg.cdtu2.dto.PlatformSalesMap;
import team.xyg.cdtu2.entity.PlatformSales;
import team.xyg.cdtu2.dao.PlatformSalesDao;
import team.xyg.cdtu2.service.PlatformSalesService;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.PageRequest;

import javax.annotation.Resource;
import java.util.List;

/**
 * (PlatformSales)表服务实现类
 *
 * @author makejava
 * @since 2022-06-28 08:54:32
 */
@Service("platformSalesService")
public class PlatformSalesServiceImpl implements PlatformSalesService {
    @Resource
    private PlatformSalesDao platformSalesDao;




    /**
     * 查询平台销售额的Top4
     * @param topNum
     * @return
     */
    @Override
    public List<PlatMapData> queryTop(Integer topNum) {
        return platformSalesDao.queryTop(topNum);
    }

    /**
     * 统计平台总销售额
     * @return
     */
    @Override
    public Integer sumMoney() {
        return platformSalesDao.sumMoney();
    }




    @Override
    public List<PlatformSalesMap> queryplatform_sales() {
        return platformSalesDao.queryplatform_sales();
    }
}
